package com.awen.htmlparser.rule;

import java.util.List;

/**
 * CyouHTML解析规则
 * User: awen
 * Date: 13-4-8
 * Time: 上午9:54
 * To change this template use File | Settings | File Templates.
 */
public  class CyouHtmlParseRule{

    private String name;//规则名称

    private String encoding = "UTF-8";//编码

    private boolean needLocateHtml;//是否截出HTMLText，一般供CyouHtmlTextParser去继续处理

    private RuleConfig locateRuleConfig;//定位的HTML区块

    private String plainTextFormat = "TRIM";//字段处理 格式如 TRIM|SUBSTR:1,2 此字段在needLocateHtml为true时候非空

    private List<CyouHtmlParseRuleItem> ruleItems;//解析字段列表

    public String getPlainTextFormat() {
        return plainTextFormat;
    }

    public void setPlainTextFormat(String plainTextFormat) {
        this.plainTextFormat = plainTextFormat;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEncoding() {
        return encoding;
    }

    public void setEncoding(String encoding) {
        this.encoding = encoding;
    }

    public List<CyouHtmlParseRuleItem> getRuleItems() {
        return ruleItems;
    }

    public void setRuleItems(List<CyouHtmlParseRuleItem> ruleItems) {
        this.ruleItems = ruleItems;
    }

    public boolean isNeedLocateHtml() {
        return needLocateHtml;
    }

    public void setNeedLocateHtml(boolean needLocateHtml) {
        this.needLocateHtml = needLocateHtml;
    }

    public RuleConfig getLocateRuleConfig() {
        return locateRuleConfig;
    }

    public void setLocateRuleConfig(RuleConfig locateRuleConfig) {
        this.locateRuleConfig = locateRuleConfig;
    }

}
